<?php
/**
 * Created by PhpStorm.
 * User: xiaotao
 * Date: 18-6-3
 * Time: 下午6:22
 */

namespace app\common\model;


use think\Model;

class Rule extends Model
{
    protected $type = [
        'id'        =>  'integer',
        'status'    =>  'integer',
        'pid'       =>  'integer',
        'sort'      =>  'integer',
        'create_time'       =>  'integer',
        'update_time'      =>  'integer'
    ];

    // getter
    public function getCreateTimeAttr($val) {
        return date('Y-m-d H:i:s', $val);
    }

    public function getUpdateTimeAttr($val) {
        return date('Y-m-d H:i:s', $val);
    }

}